&c Literal

Used to represent a color literal.

Notes

Part

Type

Description

RR

String

The amount of Red in the color, in hexidecimal. The range is from 00 to FF.

GG

String

The amount of Green in the color, in hexidecimal. The range is from 00 to FF.

BB

String

The amount of Blue in the color, in hexidecimal. The range is from 00 to FF.


&cRRGGBB


&c provides an alternate way to specify a Color using the RGB model. It provides the same functionality as the RGB function, except that you specify the amount of each primary color in hexidecimal (00-FF) rather than decimal (0-255). In the Code Editor, the parameters RR, GG, and BB appear in the color that they represent. A color can also be specified using the HSV and CMY models.


Example

The following example allows the user to select a color that will be used as the fillcolor in a Rectangle control.

Dim c  as Color
Dim b as Boolean
c=&cFFFFFF //set the default color shown in color picker
b= SelectColor(c,"Select a Color")
Rectangle1.FillColor=c

See Also

CMY, HSV, RGB functions; Color class.